import React from 'react';
import { render } from 'react-dom';
import { Router, Route } from 'react-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import KanbanBoardContainer from './kehan/KanbanBoardContainer';
import KanbanBoard from './kehan/KanbanBoard';
import EditCard from './kehan/EditCard';
import NewCard from './kehan/NewCard';


let cardsList = [{
	id: 1,
	title: "Read the BookRead the BookRead the BookRead the BookRead the BookRead the BookRead the Book",
	description: "I should read the whole book",
	status: "done",
	color: '#BD8D31',
	tasks: []
},{
	id: 1,
	title: "Read the Book",
	description: "I should read the whole book",
	status: "in-progress",
	color: '#BD8D31',
	tasks: []
}, {
	id: 2,
	title: "Write some code",
	description: "Code along with the samples in the book",
	status: "todo",
	color: '#3A7E28',
	tasks: [{
		id: 1,
		name: "ContactList Example",
		done: true
	}, {
		id: 2,
		name: "Kanban Example",
		done: false
	}, {
		id: 3,
		name: "My own experiments",
		done: false
	}]
}];



render((
	<Router history={createBrowserHistory()}>
		<Route component={KanbanBoardContainer}>
			<Route path="/" component={KanbanBoard}>
				<Route path="new" component={NewCard} />
				<Route path="edit/:card_id" component={EditCard} />
			</Route>
		</Route>
	</Router>
), document.getElementById('app'));